com.supermap.data

Class PathSmoothTool

  • java.lang.Object
    • com.supermap.data.PathSmoothTool


  • public class PathSmoothTool
    extends java.lang.Object
    Trace optimization tool class

    Usages:

    PathSmoothTool pathSmoothTool = new PathSmoothTool(); pathSmoothTool.setIntensity(2); //Sets the filtering intensity. 3 is by default List outList = pathSmoothTool.pathOptimize(sourcePositionList);

    • Constructor Detail

      • PathSmoothTool

        public PathSmoothTool()
        construction
    • Method Detail

      • getIntensity

        public int getIntensity()
        get filter strength
        Returns:
      • setIntensity

        public void setIntensity(int mIntensity)
        set filter strength
        Parameters:
        mIntensity -
      • getThreshhold

        public float getThreshhold()
        get filter threshold
        Returns:
        滤波阈值
      • setThreshhold

        public void setThreshhold(float mThreshhold)
        set filter threshold
        Parameters:
        mThreshhold -
      • setNoiseThreshhold

        public void setNoiseThreshhold(float mnoiseThreshhold)
        set noise reduction threshold
        Parameters:
        mnoiseThreshhold -
      • pathOptimize

        public java.util.List<Point2D> pathOptimize(java.util.List<Point2D> originlist)
        Trace smoothing optimization
        Parameters:
        originlist - the original trance list, list.size is bigger than 2.
        Returns:
        optimized trace list
      • kalmanFilterPath

        public java.util.List<Point2D> kalmanFilterPath(java.util.List<Point2D> originlist)
        Trace smoothing
        Parameters:
        originlist - the original trance list, list.size is bigger than 2.
        Returns:
        the trace list after smoothing processing
      • removeNoisePoint

        public java.util.List<Point2D> removeNoisePoint(java.util.List<Point2D> originlist)
        Denoises traces to delete the point that vertical distance is bigger than 20m.
        Parameters:
        originlist - the original trance list, list.size is bigger than 2.
        Returns:
      • kalmanFilterPoint

        public Point2D kalmanFilterPoint(Point2D lastLoc,
                                         Point2D curLoc)
        Single point wave filtering
        Parameters:
        lastLoc - the coordinates of the last positioning point
        curLoc - the coordinates of the positioning point
        Returns:
        the coordinates of the positioning point after filtering
      • reducerVerticalThreshold

        public java.util.List<Point2D> reducerVerticalThreshold(java.util.List<Point2D> inPoints)
        Rarefies traces
        Parameters:
        inPoints - the trace list to be rarefied. two points at least. Deletes the point that vertical distance is less than mThreshhold.
        Returns:
        the rarefied trace list
      • calculateLineDistance

        public static float calculateLineDistance(Point2D var0,
                                                  Point2D var1)
        calculate distance
        Parameters:
        starting - point
        ending - point
        Returns: